//////////////////////////////////////////////////////////////////////////////////////////////////////////
// Name:	Goal_TakePathToRange.h
// 
// Author:	Onyebuchi Ekenta
//
// Desc:	This goal takes a position, and a radius, and creates a path to that position, and causes
//			the character to follow that path until it enters the range specified by the radius. If the
//			radius specified is less than the WayPointSeekDist in SteeringBehavior, than it is set to 
//			that value. So, passing to it a range of 0 would be equivalent to telling it to go directly
//			to that point.
/////////////////////////////////////////////////////////////////////////////////////////////////////////

#ifndef Goal_TakePathToLocation_H
#define Goal_TakePathToLocation_H

#include "GoalComposite.h"
#include "Path.h"


class Character;
class Goal_TakePathToRange : public Goal_Composite<Character>
{
private:
	Path* m_pPath; // The path the character is takin
	double m_dRange; // The radius around the destination the character must enter
	Vector2D m_vDestination; // The destination

public:
	Goal_TakePathToRange(Character* owner, Vector2D destination, double range, Permissions perm = OVER_LAND);


	Goal_TakePathToRange(Character* owner, Path* path, double range);

	void	Activate();
	int		Process();
	void	Terminate();

	bool HandleMessage(const Message& msg);
};

#endif